This appendix contains the following topics:
Introduction to Source Code and MySet
Running the Batches and Editing the Source
If you are a source code partner and you are adding graphical screens to your system, you must edit the source program and add several master records, for each graphical screen, to the MySet file (MEMFIL).
There are two types of records in the MEMFIL. Those created by users and master records. Both are needed for Accessing/executing graphical programs. This process describes how you would add or delete records needed for accessing/executing graphical programs.
This is done using two batch processes.
Use the MEMMAKE batch to create an export of MEMFIL Master records and 2 copy files to be added to the GUI program being processed. MEMMAKE batch processes only one GUI program at a time.
Any reference below to AUXENT, refers to an example of setting up AUXENT.PR & AUXENT.psf within MySet.
(*.psf file is the file found in ACUBench’s Event Paragraph)
There are 5 parameters needed when running the MEMMAKE batch:
Here is a MEMMAKE.BAT example:
rem ACTINQ. psf GL 01 Cpy Src Exp
rem -- -- -- -- --- ---
START "" /WAIT WRUN32 -lex errfil -C CBLCONFI.FU MEMDRVR.ACU %1 %2 %3 %4 %5
Command line parameters, e.g.
CALL MEMMAKE.BAT \120PBSSOURCE\V12-03.WRK.V810\PR\AUXENT.psf PR 01 \120PBSSOURCE\V12-03.WRK.V810\COPYLIB \120PBSSOURCE\V12-03.WRK.V810\PR\SOURCE\AUXENT.PR
(Note that MFG programs use ..\COPYLIB_MFG rather than ..\COPYLIB as above)
Parm#1 is the location of program’s .psf file, including its full path (input into MEMMAKE)
Parm#2 is the package or sys-id (field used to update the new MEMFIL records. Use CT for system programs; not RW)
Parm#3 is the log file name sequence number. (output)
Parm#4 is the location, including full path, where the new copy files will be stored (output). In this example, AUXENT.MWS and AUXENT.MEM.
Parm#5 is location, including full path, where the program source can be found (input into MEMMAKE)
Note: if you need to update more than one GUI program for MySet, run MEMMAKE Batch multiple times, once for each GUI program. Then the output export file, MEMFIL.UPD, can be used to update MEMFIL with one run of MEMADD Batch (see MEMADD below)
Add the following:
MEMMAKE.BAT calls wrun32. You will need to ensure wrun32.exe is part of the path.
The 3 COBOL programs used in this feature are MEMDRVR.acu, MEMMAKE.acu, MEMADD.acu. All 3 can be found in the top-level folder of any PBS installation (starting at version v12.03).
Example of input/output using AUXENT.PR:
Input:
\120PBSSOURCE\V12-03.WRK.V810\PR\AUXENT.psf
\120PBSSOURCE\V12-03.WRK.V810\PR\SOURCE\AUXENT.PR
I-O:
MEMFIL01.LOG
(New log records are added to log file. To start a fresh log file, delete before running MEMMAKE.BAT.)
MEMFIL.UPD
(New MEMFIL export records are added to MEMFIL.UPD file. To start a fresh MEMFIL.UPD file, delete it before running MEMMAKE.BAT.)
Output:
\120PBSSOURCE\V12-03.WRK.V810\COPYLIB\AUXENT.MEM (Note that MFG programs use ..\ COPYLIB_MFG here)
\120PBSSOURCE\V12-03.WRK.V810\COPYLIB\AUXENT.MWS (Note that MFG programs use ..\ COPYLIB_MFG here)
Note: if you need to update more than one GUI program for MySet, run MAMMAKE Batch multiple times, once for each GUI program. Then the output export file, MEMFIL.UPD, can be used to update MEMFIL with one run of MEMADD Batch (see MEMADD below).
Use the MEMADD batch to update runtimes’ MEMFIL.DAT/MEMFIL.vix.
MEMADD Batch will be used when the controls have been modified on an existing screen or for any new screens using the MySet process.
There are no parameters needed when running the MEMADD batch. Run in top level running directories where MEMFIL.DAT resides.
Here is a MEMADD.BAT example:
set PATH=.\bin;%PATH%
START WRUN32 MEMADD
Example of input/output:
Input: MEMFIL.UPD
I-O: MEMFIL.DAT
Output: MEMADD01.LOG
This MEMADD process first deletes any MEMFIL records on file (only master records; not records added by users) for the program referenced in the MEMFIL.UPD. Then it adds the MEMFIL.UPD.
Export records to MEMFIL.DAT.
It produces a log file, MEMADD##.LOG. (It’s sequence number is automatically incremented for each run.)The log shows the number of records deleted and added by program name.
Updating multiple GUI programs at once:
Note that the MEMFIL.UPD is an export of GUI program(s) containing MEMFIL Master Export records. Only Master records are updated by MEMADD, which deletes, e.g. all Master records for every program in MEMFIL.UPD from MEMFIL, and then restores the inputted MEMFIL.UPD records into MEMFIL.DAT.
Insert into the source code:
COPY “pgmnam.MWS”. (Working-storage)
COPY “pgmnam.MEM”. (Procedure division)
And any code needed for MySet – see similar type program already coded for lines tagged with E1371. Need to change both the GUI *.psf and source code files, *.PR, *.AR, *.CBL, etc.
(*.psf file is the file found in ACUBench’s Event Paragraph)
It is important to review the most similar program already coded and use its logic.
Test all possible MySet functions, especially saving and restoring defaults for print parameters Screens, until all options of MySet works as expected while running the GUI program.
Print parameters screens:
The code below is in the *.psf file allows defaults for print parameters screens.
E1371 *** This enables the Save, Delete and Retrieve 'Help' selections.***
E1371 MOVE "Y" TO PASS-MEMFIL-SAV-DEL-GET-ENABLED-FLG.
MySet has not been coded to add defaults for maintenance and transaction screens. Do not set the flag above to “Y” within maintenance and transaction screens or any other screens, except print parameter type screens.
Current MySet run time options:
E1371 ************************************************************************
E1371 *** MEMFIL-BPL-HOT-KEYS-FOR-GUI-LINK-PARAGRAPH is in MEMFIL.BPL ***
E1371 *** It checks for these 'Hot-keys". ***
E1371 * CTRL-F2-KEY-PUSHED | Display MySet Help
E1371 * CTRL-F3-KEY-PUSHED | To maintain MySet Help
E1371 * CTRL-F7-KEY-PUSHED | To maintain View-only flag
E1371 * F7-KEY-PUSHED AND PASS-MEMFIL-KEY-PGM-NAM = "USRMNT" only
E1371 * | Copy View-only User-ID records
E1371 * F11-KEY-PUSHED | Save default
E1371 * F12-KEY-PUSHED | Delete default
E1371 * CTRL-F12-KEY-PUSHED | Retrieve default
E1371 * CTRL-F8-KEY-PUSHED | List-box Sort
E1371 * CTRL-F11-KEY-PUSHED | Toggle MySet Master switch On or Off